Ground plane estimation in a computer vision system

ABSTRACT

Estimation of the ground plane of a three dimensional (3D) point cloud based modifications to the random sample consensus (RANSAC) algorithm is provided. The modifications may include applying roll and pitch constraints to the selection of random planes in the 3D point cloud, using a cost function based on the number of inliers in the random plane and the number of 3D points below the random plane in the 3D point cloud, and computing a distance threshold for the 3D point cloud that is used in determining whether or not a 3D point in the 3D point cloud is an inlier of a random plane.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No.15/255,832, filed Sep. 2, 2016, which claims benefit of IndiaProvisional Patent Application No. 201641000375 filed Jan. 5, 2016, bothof which are incorporated herein by reference in their entirety.

BACKGROUND OF THE DISCLOSURE Field of the Disclosure

Embodiments of the present disclosure generally relate to a computervision system, and more specifically relate to ground plane estimationin a computer vision system.

Description of the Related Art

A new class of embedded safety systems, referred to as advanced driverassistance systems (ADAS), has been introduced into automobiles toreduce human operation error. Such systems may provide functionalitysuch as rear-view facing cameras, electronic stability control, andvision-based pedestrian detection systems. Many of these systems usemonocular cameras and rely on computer vision processing to detectobjects in the field of view of one or more cameras. Structure frommotion (SfM) processing is a critical operation in such systems in orderto achieve understanding of the three-dimensional environment fromtwo-dimensional images captured by the monocular camera.

SUMMARY

Embodiments of the present disclosure relate to ground plane estimationin a computer vision system. In one aspect, a method for ground planeestimation in a three dimensional (3D) point cloud in a computer visionsystem is provided that includes receiving a 3D point cloud generatedbased on a plurality of 2D frames captured by a monocular camera,determining a distance threshold for the 3D point cloud based on anestimated height of a ground plane in the 3D point cloud, and estimatingthe ground plane of the 3D point cloud by performing the following for apredetermined number of iterations: identifying a random plane in the 3Dpoint cloud from three randomly selected non-collinear 3D points in the3D point cloud, wherein an incline of the random plane meetspredetermined pitch and roll constraints, computing a cost function ofthe random plane, wherein the cost function is based on a number ofinliers of the random plane and a number of 3D points below the randomplane, wherein the distance threshold is used to determine whether ornot a 3D point in the 3D point cloud is an inlier, and saving the costfunction as a best cost function if the cost function is better than apreviously computed cost function for a previously identified randomplane.

In one aspect, a computer vision system is provided that includes amonocular camera configured to capture a plurality of two dimensional(2D) frames of a scene, and a processor configured to receive a threedimensional (3D) point cloud generated based on the plurality of 2Dframes. The processor is configured to determine a distance thresholdfor the 3D point cloud based on an estimated height of a ground plane inthe 3D point cloud, and estimate the ground plane of the 3D point cloudby performing the following for a predetermined number of iterations:identifying a random plane in the 3D point cloud from three randomlyselected non-collinear 3D points in the 3D point cloud, wherein anincline of the random plane meets predetermined pitch and rollconstraints, computing a cost function of the random plane, wherein thecost function is based on a number of inliers of the random plane and anumber of 3D points below the random plane, wherein the distancethreshold is used to determine whether or not a 3D point in the 3D pointcloud is an inlier, and saving the cost function as a best cost functionif the cost function is better than a previously computed cost functionfor a previously identified random plane.

BRIEF DESCRIPTION OF THE DRAWINGS

Particular embodiments will now be described, by way of example only,and with reference to the accompanying drawings:

FIG. 1 is a flow diagram of a method for estimating the ground plane ina three dimensional (3D) point cloud;

FIG. 2 is an example illustrating direction of pitch and roll of acamera;

FIG. 3 is an example illustrating the axis convention for 3D points;

FIG. 4 and FIG. 5 are examples illustrating pruning of a 3D point cloud;

FIG. 6 and FIG. 7 are examples illustrating use of a modified costfunction;

FIG. 8 is an example illustrating a trapezoidal region of an image;

FIG. 9 is a flow diagram of a method for estimating the ground plane ofa 3D point cloud;

FIG. 10 is an example illustrating determination of a distance thresholdfor a 3D point cloud with unknown scale; and

FIG. 11 is a high level block diagram of an example multiprocessorsystem-on-a-chip (SOC) configured for use in a monocular camera-basedautomotive safety application.

DETAILED DESCRIPTION OF EMBODIMENTS OF THE DISCLOSURE

Specific embodiments of the disclosure will now be described in detailwith reference to the accompanying figures. Like elements in the variousfigures are denoted by like reference numerals for consistency.

As previously mentioned, structure from motion (SfM) processing is acritical operation in the computer vision processing performed in manycamera-based embedded safety systems. In the real-time SfM processing offrames captured by a monocular camera, an SfM reconstruction pipelinedetects and tracks two dimensional (2D) locations of interest pointsacross sequential frames, storing the 2D locations in trackscorresponding to the interest points. For each frame processed in thepipeline, tracks are updated based on the frame content andtriangulation is performed on each of the resulting tracks to generate aset of three dimensional (3D) points, which may be referred to as a 3Dpoint cloud herein.

The goal of SfM is to recover the three dimensional (3D) environment inthe field of view (FOV) of the camera. More specifically, in automotiveapplications, one goal of SfM is to determine the distance of objects inthe FOV from a vehicle. SfM using only images can reconstruct the 3Denvironment only up to a scale factor that cannot be determined from theimages. Without this scale factor, object distance cannot be reliablydetermined.

There are several known techniques for computing this unknown scalefactor. Some such techniques use an external sensor such as an inertialmeasurement unit or a speedometer. Other such techniques use the heightof the camera from the ground. In order to determine the scale factorbased on the height of the camera, two things are needed: 1) the heightof the camera from the ground, and 2) the ground plane in the form ofscaled 3D points. Camera height, also referred to as ground height, isthe distance from the camera center to the ground plane. In automotiveapplications, the height of the camera is trivially available becausethe camera is installed in a fixed location in the vehicle.

Embodiments of the disclosure provide for estimating the ground planefrom a 3D point cloud. The estimated ground plane and the availablecamera height can then be used to determine the scale of the 3D pointcloud, and thus the distances of objects detected in the scene. Theground plane estimation is based on the well-known random sampleconsensus (RANSAC) algorithm. In general, the RANSAC algorithm fits amodel to data points when no single model fits the data pointscompletely and there is one model that accounts for a large number ofthe data points. This algorithm is well suited for detection of a groundplane as a 3D point cloud has a high probability of including a lot ofpoints that lie on the ground plane and there will also be points thatlie above the ground plane.

FIG. 1 is a flow diagram illustrating estimating the ground plane in a3D point cloud using RANSAC. Given a 3D point cloud, a random plane isidentified 100 in the 3D point cloud. The random plane may be identifiedby choosing three random non-collinear points in the 3D point cloud andcomputing the equation of the plane that passes through the threepoints. A check may be made to ensure that the three randomly selectedpoints are not the same as any previously chosen set of three points andthe selection repeated if the three points match any previously selectedset.

The cost function of the plane is then computed 102, i.e., the number of3D points in the 3D point cloud on or near the plane is determined.These points are referred to as “inliers.” Thus, the cost function ofthe plane is simply the number of inliers. In addition, the higher thecost, i.e., the higher the number of inliers, the better the plane. Thedetermination of whether or not a 3D point is an inlier may be made bycomputing the distance of the 3D point from the plane and comparing thatdistance to a distance threshold. If the distance is below thethreshold, the 3D point is determined to be an inlier.

The cost function is then compared 104 to the current best cost functionto determine if the new cost function is better. If the current costfunction is better, the cost function is saved 106 as the best costfunction and the plane is saved as the best plane. The steps 100-108 arerepeated for some predetermined number of iterations. Once alliterations have been performed, the current best plane is identified asthe ground plane. The number of iterations k may be determined as per

$k = \frac{\log \left( {1 - p} \right)}{\log \left( {1 - w^{n}} \right)}$

where p is the desired probability for finding the ground plane, w isthe number of inliers divided by the total number of 3D points, and n isthe number of points needed for estimating the model. For modeling aplane, n=3. Assuming that w=0.125, the minimum number of iterationsneeded for a 99% probability of finding the ground plane isapproximately 2350.

The above algorithm may not be sufficiently robust to consistentlyidentify the ground plane as the algorithm identifies any randomlyselected plane with the largest number of inliers among the randomlyselected planes as the ground plane. In other words, there is nocertainty that the resulting plane is the ground plane. Embodiments ofthe disclosure provide modifications to the algorithm that take intoconsideration environmental constraints present in the automotiveenvironment to help ensure that the plane selected with the modifiedalgorithm is the ground plane.

In some embodiments, one modification to the RANSAC algorithm to helpeliminate false ground plane detection is to apply pitch and rollconstraints as part of the random plane selection to eliminate anyrandom planes that do not fall within the pitch and roll constraints.FIG. 2 is an example illustrating direction of pitch and roll of acamera. The pitch and roll of a camera can be determined duringcalibration when the vehicle is stationary on a flat surface. Thesemeasurements form the base measurements of pitch and roll, i.e.,baseRoll and basePitch, from which variations can be determined as thevehicle is moving. Neither of these measurements will be large as theaxis of the camera will be nearly parallel to the ground plane. Further,when the vehicle is moving, it is typically on nearly flat surfaces, sothe incline of the ground plane will be low.

When the vehicle is moving, the actual roll and pitch will vary but in atypical operation on a road, the difference between the actual roll andpitch and the baseline roll and pitch will be small. A range forvariation in roll and a range for variation in pitch may be used toeliminate any randomly selected planes with inclines outside of theseranges. The roll range may be defined as [baseRoll−deltaRoll,baseRoll+deltaRoll] and the pitch range may be defined as[basePitch−deltaPitch, basePitch+deltaPitch]. The particular values ofdeltaRoll and deltaPitch may be implementation dependent and may be anysuitable value. The values of deltaRoll and deltaPitch may be determinedempirically. A typical value for these deltas may be in the range of 0.5to 2.0 degrees. Any random planes with a pitch and roll that do not fallwithin these ranges may be ignored and a new random plane selected.

In some embodiments, one modification to the RANSAC algorithm to helpeliminate false ground plane detection is to prune the 3D point cloud toeliminate 3D points that are likely not to be part of the ground plane.This pruning may be based on the height of the camera, i.e., any pointsabove the height of the camera can be eliminated as such 3D points arenot likely to be in the ground plane. FIG. 3 is an example illustratingthe axis convention for 3D points. A right hand rule is used in whichthe X axis is to the right, the Y axis is down, and the Z axis is in thedirection of movement, i.e., the direction in which the vehicle ismoving. The origin is the camera center. Note that the Y coordinate of a3D point increases with a decrease in height. Given that the camerapitch is not large when a vehicle is moving, the 3D points in the groundplane will have a larger Y coordinate than other 3D points in a 3D pointcloud, e.g., 3D points corresponding to trees or buildings.

Instead of considering all 3D points in the 3D point cloud, the 3Dpoints are sorted by Y coordinate value from highest to lowest and T %of the highest sorted 3D points are processed to determine the groundplane. The value of T is implementation dependent and may be anysuitable value, which may be empirically determined. For example, if SfMis used to reconstruct the full FOV, the value of T may be in the rangeof 45% to 55%. If SfM uses a pre-computed region of interest (ROI) notspanning the entire FOV, the value of T may differ. FIGS. 4 and 5 areexamples illustrating the effect of this pruning assuming SfM of thefull FOV and T=50. FIG. 4 shows the reconstructed 3D point cloudprojected onto the image without pruning and FIG. 5 shows the pruned 3Dpoint cloud projected onto the image. FIG. 5 shows that only the 3Dpoints below the camera are remaining in the pruned 3D cloud.

This pruning reduces the complexity of the computation as theprobability of finding the ground plane depends on the numberiterations. As previously described, for a given probability, the numberof iterations needed to achieve that probability can be predetermined.If the number of 3D points is reduced by, e.g., 50%, the number ofiterations can be reduced. For example, if T=50, then w may be increasedto 0.25, thus reducing the number of iterations to approximately 300 fora 99% probability of finding the ground plane.

In some embodiments, one modification to the RANSAC algorithm to helpeliminate false ground plane detection is to change the cost function tobetter model the ground plane. For generic plane fitting, using thenumber of inliers as the cost function to find the best plan is a goodoption. However, experiments have shown that the best plane selected byRANSAC was not the ground plane in many instances. This was due to arelatively sparse point cloud such that the ground plane was not themost dense plane, i.e., the plane with the most inliers. In many cases,planes that were some distance above the ground were incorrectly chosenas the ground plane.

To better model the ground plane, the cost function is changed to alsotake into consideration the number of 3D points below the plane. Thatis, the cost function of a plane is the number of inliers minus thenumber of 3D points below the plane in the 3D point cloud. The modifiedcost function ensures that the plane selected as the ground plane has alow height, i.e., very few points below it, and is thus more likely tolie on the ground. FIGS. 6 and 7 are examples illustrating the effect ofusing the modified cost function. In FIG. 6, the use of the previouscost function resulted in the detection of the illustrated ground plane,which is above the true ground plane. In FIG. 7, the use of the modifiedcost function resulting in the detection of the illustrated groundplane, which is much closer to the true ground plane.

In some embodiments, one modification to the RANSAC algorithm to helpeliminate false ground plane detection is to further modify the costfunction to give greater weight to some of the inliers. This is based onthe observation that some parts of an image are more likely to be on theground than others. For example, the area of an image directly in frontof a vehicle is more likely to be part of the ground plane than otherareas of the image. Thus, such areas can be given more influence in theground plane decision.

The inliers to be given more weight are those 3D points that lie in atrapezoid region of an image (frame) used to generate the 3D point cloudas illustrated in the example of FIG. 8. In this example, the notationson the axes are the 2D coordinates as a fraction of the image width andheight. The dimensions of the trapezoid region may be determinedempirically. The 3D points that fall within this trapezoid region can bedetermined because the projections of the 3D points into the 2D imageare known from the SfM processing. For example, the last 2D location ofa track corresponding to a 3D point may be used to determine if the 3Dpoint is in the trapezoid region. With the addition of the weight factorw, the cost function for a plane is (number of inliers outside thetrapezoid−number of points below the plane outside thetrapezoid)+w*(number of inliers inside the trapezoid−number of pointsbelow the plane inside the trapezoid). Any suitable value of w may beused. The value of w may be determined empirically.

FIG. 9 is a flow diagram of a method for estimating the ground plane ofa 3D point cloud. The method is based on the RANSAC algorithm butembodiments include one or more of the previously describedmodifications. Given a 3D point cloud, the 3D point cloud is pruned 900to remove 3D points not likely to be part of the ground plane. Aspreviously described herein, the pruning may be performed by sorting the3D points by the Y coordinate value and retaining the top T % of thesorted 3D points to be processed for estimating the ground plane. Inaddition, the distance threshold to be used to decide if a 3D point isan inlier of a plane is determined. Determination of this distancethreshold is described below in reference to FIG. 10.

After the pruning, a random plane is identified 902 in the pruned 3Dpoint cloud. The random plane may be identified by choosing threenon-collinear random points in the pruned 3D point cloud and computingthe equation of the plane that passes through the three points. Whilenot specifically shown, a check may be made to ensure that the threerandomly selected points are not the same as any previously chosen setof three points and the selection repeated if the three points match anypreviously selected set. A check is made to determine 904 if the inclineof the random plane is acceptable, i.e., that the incline of the randomplane is within the previously described camera roll and pitch ranges.This check may be performed by computing the roll and pitch of the planeand checking that the computed roll and pitch are within the camera rolland pitch ranges. If the plane incline is not acceptable 904, anotherrandom plane is identified 902 from the pruned 3D point cloud.

If the plane incline is acceptable 904, the cost function of the planeis then computed 906. As previously described herein, the cost functionis based on the number of inliers of the plane. The determination ofwhether or not a 3D point is an inlier may be made by computing thedistance of the 3D point from the plane and comparing that distance tothe distance threshold determined for the 3D point cloud. If thedistance is below the threshold, the 3D point is determined to be aninlier. In some embodiments, the cost function is computed as the numberof inliers minus the number of 3D points below the plane in the pruned3D point cloud as previously described herein. In some embodiments, thecost function is computed as per the weighted cost function previouslydescribed herein.

The cost function is then compared 908 to the current best cost functionto determine if the new cost function is better. If the current costfunction is better, the cost function is saved 910 as the best costfunction, the plane is saved as the best plane, and the inliers for theplane are saved. The steps 902-912 are repeated for some predeterminednumber of iterations. Determination of the number of iterations ispreviously described herein. Once all iterations have been performed, aleast squares algorithm is applied 914 to the inliers for the best planeto determine the ground plane.

Once the ground plane is estimated, the scale can be estimated based onthe ground plane and the height of the monocular camera used to capturethe frames used to generate the 3D point cloud. Given the scale of the3D scene, distances and positions of objects can be estimated instandard units, e.g., meters, miles, feet.

Note that the efficacy of the above method depends on the definition ofinlier. If the scale of a 3D point cloud is known, the distance betweena 3D point in the cloud and any plane can be computed and a thresholdbased on metric distance can used to decide if the point is lying on theplane or not. In an SfM generated point cloud, the scale is an unknownquantity and distance of a point from a plane is known only up to scale.In some embodiments, a distance threshold for a 3D point cloud isdetermined based an estimated height of the ground plane. This estimatedheight, which is also referred to as the reference height, may be foundby identifying 3D points in the 3D point cloud likely to be on theground plane, finding the height of each of the identified 3D pointsfrom the ground, which is known only up to scale, and computing thethreshold as a fraction of a height likely to correspond to a 3D pointon the ground plane, i.e., the reference height.

FIG. 10 is an example illustrating determination of a distance thresholdfor a 3D point cloud with unknown scale. To find the reference heightneeded to compute the distance threshold, the 3D points in the 3D pointcloud are sorted 1000 by the Y coordinates. Note that in embodiments inwhich pruning is preformed, the same sort used for pruning may be usedto find the reference height. As previously described in reference toFIG. 3, the Y coordinate of a 3D point decreases as height above theground increases. The Y coordinate of a 3D point that lies at or closeto the 90^(th) percentile (assuming the sort is lowest value to highestvalue) of the sorted 3D points is selected as the reference height. Notethat the 3D point with the largest Y coordinate cannot always be assumedto lie on the true ground plane as there may be noise in the SfMreconstruction. Selecting a point that eliminates approximately 10% ofpoints with higher Y coordinates is compensation for the effect of anynoise in the SfM reconstruction.

To choose the particular percentile to be used to select the referenceheight, tests may be conducted using 3D point clouds with a known scalethat are representative of the environment in which a vehicle willoperate. The 3D points in the point clouds may be sorted by the Ycoordinate and the Y coordinates at various percentiles checked acrossthe 3D point clouds to determine what percentile most closelycorresponds to a Y coordinate on the respective ground planes (assuminglow pitch and roll) across the 3D point clouds.

Given the reference height, i.e., the Y coordinate of the selected 3Dpoint, the distance threshold is computed as a fraction of the value ofthe Y coordinate. The particular fraction used is a target distancethreshold divided by the known camera height. For example, the Ycoordinate is assumed to be the height of the camera. If the targetdistance threshold is 10 centimeters and the known height of the camerais 1.5 meters, the threshold is 6.7% of the camera height, i.e., 10/150.Thus, the distance threshold may be computed as 6.7% of the referenceheight. The target distance threshold may be determined empirically.

FIG. 11 is a high level block diagram of an example multiprocessorsystem-on-a-chip (SOC) 1100 configured for use in a monocularcamera-based ADAS. In particular, the example SOC 1100 is an embodimentof the TDA3X SOC available from Texas Instruments, Inc. A high leveldescription of the components of the SOC 1100 is provided herein. Moredetailed descriptions of example components may be found in M. Mody, etal., “High Performance Front Camera ADAS Applications on TI's TDA3XPlatform,” Proceedings of 2015 IEEE 22^(nd) International Conference onHigh Performance Computing, Dec. 16-19, 2015, Bangalore, India, pp.456-463, and “TDA3× SOC Processors for Advanced Driver Assist Systems(ADAS) Technical Brief,” Texas Instruments, SPRT704A, October, 2014, pp.1-6, which are incorporated by reference herein.

The SOC 1100 includes dual general purpose processors (GPP) 1102, dualdigital signal processors (DSP) 1104, and a vision processor 1106coupled via a high speed interconnect 1122. The SOC 1100 furtherincludes a direct memory access (DMA) component 1108, a camera capturecomponent 1110 coupled to a monocular camera 1124, a display managementcomponent 1114, on-chip random access (RAM) memory 1116, and variousinput/output (I/O) peripherals 1120 all coupled to the processors viathe interconnect 1122. In addition, the SOC 1100 includes a safetycomponent 1118 that includes safety related functionality to enablecompliance with automotive safety requirements. Such functionality mayinclude support for CRC (cyclic redundancy check) of data, clockcomparator for drift detection, error signaling, windowed watch-dogtimer, and self testing of the SOC for damage and failures. Softwareimplementing real-time SfM to generate 3D points clouds based on framescaptured from the monocular camera 1124 and implementing an embodimentof the ground plane detection as described herein to detect groundplanes in the 3D point clouds may be stored in the memory 1116 and mayexecute on one or more programmable processors of the SOC 1100.

Other Embodiments

While the disclosure has been described with respect to a limited numberof embodiments, those skilled in the art, having benefit of thisdisclosure, will appreciate that other embodiments can be devised whichdo not depart from the scope of the disclosure as disclosed herein.

For example, embodiments have been described herein in which the 3Dpoint cloud is pruned prior to searching for the ground plane. One ofordinary skill in the art will understand embodiments in which the 3Dpoint cloud is not pruned.

In another example, embodiments have been described herein in which adistance threshold is determined for each 3D point cloud. One ofordinary skill in the art will understand embodiments in which thedistance threshold is determined when the scale of a 3D point cloud mayhave changed.

In another example, embodiments have been described herein in which theground plane estimation is implemented as software instructions executedon processors in a multiprocessor SOC. One of ordinary skill in the artwill understand that ground plane estimation may be implemented as anysuitable combination of software, firmware, and hardware. For example,some of the functionality may be implemented in one or more hardwareaccelerators, application specific integrated circuits (ASICs),field-programmable gate arrays (FPGAs), etc.

In another example, embodiments have been described herein in referenceto automotive safety systems. One of ordinary skill in the art willunderstand embodiments for other computer vision applications havingsimilar environmental constraints, such as, for example, industrialapplications, robotics, and consumer applications such as vacuumcleaners.

Certain terms are used throughout the description and the claims torefer to particular system components. As one skilled in the art willappreciate, components in systems may be referred to by different namesand/or may be combined in ways not shown herein without departing fromthe described functionality. This document does not intend todistinguish between components that differ in name but not function. Inthe description and in the claims, the terms “including” and“comprising” are used in an open-ended fashion, and thus should beinterpreted to mean “including, but not limited to . . . .” Also, theterm “couple” and derivatives thereof are intended to mean an indirect,direct, optical, and/or wireless electrical connection. Thus, if a firstdevice couples to a second device, that connection may be through adirect electrical connection, through an indirect electrical connectionvia other devices and connections, through an optical electricalconnection, and/or through a wireless electrical connection, forexample.

It is therefore contemplated that the appended claims will cover anysuch modifications of the embodiments as fall within the true scope ofthe disclosure.

What is claimed is:
 1. A method for ground plane estimation in a threedimensional (3D) point cloud in a computer vision system, the methodcomprising: receiving a 3D point cloud generated based on a plurality of2D frames captured by a monocular camera; determining a distancethreshold for the 3D point cloud based on an estimated height of aground plane in the 3D point cloud; estimating the ground plane of the3D point cloud by performing the following for a number of iterations:identifying a random plane in the 3D point cloud from three randomlyselected non-collinear 3D points in the 3D point cloud, wherein anincline of the random plane meets pitch and roll constraints; computinga cost function of the random plane, wherein the cost function is basedon a difference between a number of inliers of the random plane and anumber of 3D points below the random plane, wherein the distancethreshold is used to determine whether or not a 3D point in the 3D pointcloud is an inlier; and saving the cost function as a best cost functionif the cost function is better than a previously computed cost functionfor a previously identified random plane.
 2. The method of claim 1,further comprising pruning the 3D point cloud prior to estimating theground plane to eliminate 3D points not likely to be on the groundplane.
 3. The method of claim 2, wherein pruning comprises sorting the3D points in the 3D point cloud according to values of Y coordinates,and eliminating all 3D points from the 3D point cloud not included in apercentage of the sorted 3D points having the highest Y coordinatevalues.
 4. The method of claim 3, wherein the percentage is in a rangeof 45% to 55%.
 5. The method of claim 1, wherein computing a costfunction comprises giving more weight to inliers of the random plane and3D points below the plane that also lie in a trapezoid of a 2D frame ofthe plurality of 2D frames.
 6. The method of claim 6, wherein computinga cost function comprises computing the cost function as (a number ofthe inliers outside the trapezoid−a number of 3D points below the randomplane outside the trapezoid)+w*(a number of the inliers inside thetrapezoid−a number of 3D points below the plane inside the trapezoid),wherein w is a weight factor.
 7. The method of claim 1, whereindetermining a distance threshold comprises determining a referenceheight for the ground plane based on 3D points in the 3D point cloudlikely to be in the ground plane, and computing the distance thresholdas a fraction of the reference height.
 8. The method of claim 7, whereinthe fraction is based on the height of the monocular camera and a targetdistance threshold.
 9. The method of claim 7, wherein determining areference height comprises sorting the 3D points in the 3D point cloudaccording to values of Y coordinates, and selecting a value of a Ycoordinate of a 3D point at a percentile of the sorted 3D points as thereference height, wherein the percentile compensates for noise in thegeneration of the 3D point cloud.
 10. A computer vision systemcomprising: a monocular camera configured to capture a plurality of twodimensional (2D) frames of a scene; and a processor configured toreceive a three dimensional (3D) point cloud generated based on theplurality of 2D frames, the processor configured to: determine adistance threshold for the 3D point cloud based on an estimated heightof a ground plane in the 3D point cloud; and estimate the ground planeof the 3D point cloud by performing the following for a number ofiterations: identifying a random plane in the 3D point cloud from threerandomly selected non-collinear 3D points in the 3D point cloud, whereinan incline of the random plane meets pitch and roll constraints;computing a cost function of the random plane, wherein the cost functionis based on a difference between a number of inliers of the random planeand a number of 3D points below the random plane, wherein the distancethreshold is used to determine whether or not a 3D point in the 3D pointcloud is an inlier; and saving the cost function as a best cost functionif the cost function is better than a previously computed cost functionfor a previously identified random plane.
 11. The computer vision systemof claim 10, wherein the processor is further configured to prune the 3Dpoint cloud prior to estimating the ground plane to eliminate 3D pointsnot likely to be on the ground plane.
 12. The computer vision system ofclaim 11, wherein the processor is configured to prune the 3D pointcloud by sorting the 3D points in the 3D point cloud according to valuesof Y coordinates, and eliminating all 3D points from the 3D point cloudnot included in a percentage of the sorted 3D points having the highestY coordinate values.
 13. The computer vision system of claim 12, whereinthe percentage is in a range of 45% to 55%.
 14. The computer visionsystem of claim 10, wherein computing the cost function comprises givingmore weight to inliers of the random plane and 3D points below the planethat also lie in a trapezoid of a 2D frame of the plurality of 2Dframes.
 15. The computer vision system of claim 13, wherein computingthe cost function comprises computing the cost function as (a number ofthe inliers outside the trapezoid−a number of 3D points below the randomplane outside the trapezoid)+w*(a number of the inliers inside thetrapezoid−a number of 3D points below the plane inside the trapezoid),wherein w is a weight factor.
 16. The computer vision system of claim10, wherein the processor is further configured to determine a distancethreshold by determining a reference height for the ground plane basedon 3D points in the 3D point cloud likely to be in the ground plane, andcomputing the distance threshold as a fraction of the reference height.17. The computer vision system of claim 16, wherein the fraction isbased on the height of the monocular camera and a target distancethreshold.
 18. The computer vision system of claim 16, whereindetermining a reference height comprises sorting the 3D points in the 3Dpoint cloud according to values of Y coordinates, and selecting a valueof a Y coordinate of a 3D point at a percentile of the sorted 3D pointsas the reference height, wherein the percentile compensates for noise inthe generation of the 3D point cloud.